package com.zch.rpc.service.server;

import com.zch.rpc.register.register.ServiceRegistry;

/**
 * 经过zookeeper做服务注册发现
 */
public class ServerProvider2 {
    public static void main(String[] args) throws ClassNotFoundException {
        ServiceRegistry serviceRegistry=new ServiceRegistry("localhost",2181);//20881是zookeeper端口
        RpcServer server = new RpcServer(2882);
        server.start( "com.zch.rpc.service.serviceImpl",serviceRegistry);

    }
}
